package com.joysuch.wwyt.bp.controller;

import com.joysuch.wwyt.bp.service.BpSmsService;
import com.joysuch.wwyt.core.common.ajax.ResultBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ZhangDong
 * @Date 2021/2/20 15:56
 */
@RestController
@RequestMapping("bp/sms")
@Api(tags = "bp/sms 短信服务")
public class BpSmsController {

    @Autowired
    private BpSmsService bpSmsService;

    @GetMapping("send")
    @ApiOperation("发送验证码")
    public ResultBean send(String phone) {
        return bpSmsService.send(phone);
    }

    @GetMapping("verify")
    @ApiOperation("校验验证码")
    public ResultBean verify(String verifyCode) {
        return bpSmsService.verify(verifyCode);
    }

}
